<%@page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="root61">
<head>
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link type="text/css" rel="stylesheet"
	href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
<link type="text/css" rel="stylesheet"
	href="${ctx }/css/dlifestyle/admin.css" source="widget" />
</head>
<body style="margin: 0px">
	<section class="mainborder">
		<section class="edit_scrollable padder">
			<div class="edit_content">
				<form id="myFrom">
					<div class="form">
						<div class="item">
							<label class="col-sm-1 editlable">区域名称：</label>
							<div class="fl">
								<input class="editform-control" id="regionName"
									value="${district.regionName}" type="text" maxlength="20"
									class="text" placeholder="请输入区域名称" required> <em
									class="emStyle">*</em>
							</div>
						</div>
						<div class="item">
							<label class="col-sm-1 editlable">邮编：</label>
							<div class="fl">
								<input class="editform-control" id="postCode"
									value="${district.postCode}" type="text" maxlength="20"
									class="text" placeholder="请输入邮编" required> <em
									class="emStyle">*</em>
							</div>
						</div>
						<input id="regionLevel" type="hidden"
							value="${district.regionLevel }"> <input id="eParentId"
							type="hidden" value="${district.parentId }"> <input
							id="regionId" type="hidden" value="${district.id }">
						<div class="item">
							<label class="col-sm-1 editlable">区域级别：</label>
							<div class="fl">
								<select id="editLevel" class="editform-control"
									style="height: 29px; width: 100px;">
									<option value="-1"
										<c:if test="${district.regionLevel == -1 }">selected="selected"</c:if>>区域等级</option>
									<option value="1"
										<c:if test="${district.regionLevel == 1 }">selected="selected"</c:if>>省</option>
									<option value="2"
										<c:if test="${district.regionLevel == 2 }">selected="selected"</c:if>>市</option>
									<option value="3"
										<c:if test="${district.regionLevel == 3 }">selected="selected"</c:if>>区</option>
								</select> <em class="emStyle">*</em>
							</div>
						</div>
						<div id="province" class="item"
							style="margin-bottom: 0px; display: none;">
							<label class="col-sm-1 editlable">上级区域：</label>
							<div class="fl">
								<c:if test="${type == 1 }">
									<select class="editform-control"
										style="height: 29px; width: 140px;" id="parentId"
										name="parentId" required>
										<option value="${district.parentId }">${pInfo.regionName}</option>
									</select>
								</c:if>
								<c:if test="${type == 2 }">
									<select class="editform-control"
										style="height: 29px; width: 140px;" id="parentId"
										name="parentId" required>
										<c:forEach items="${listDistrict }" var="item"
											varStatus="itemStatus">
											<option value="${item.id }"
												<c:if test="${item.regionName == pInfo.regionName}" >selected="selected"</c:if>>${item.regionName}</option>
										</c:forEach>
									</select>
								</c:if>
							</div>
						</div>
					</div>
				</form>
			</div>
		</section>
	</section>

	<script type="text/javascript">
		document.getElementById("myFrom").reset();
	</script>
</body>
<script
	src="${ctx}/js/controllers/system/district/DistrictEditController.js"
	type="text/javascript"></script>
<script type="text/javascript">
	var ctx = '${ctx}';
	setCtx(ctx);
</script>
<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</html>
